Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Chad Rosenthal 272 posts 474 karma points
    Apr 26, 2011 @ 16:38
    Chad Rosenthal
    0

    Method returning {localLink:1058}

    I'm currently creating a /base method that returns content from a Rich Text Editor to display in an AJAX Form. (Umbraco 4.7).

    My method is:

    outputText = umbraco.library.HtmlEncode(thankYouNode.GetProperty("mainContent").Value);

    And the output to the screen is:

    <p><a href="/{localLink:1058}" title="Home">link</a></p>

    Obviously not ideal. Any ideas?


     

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Apr 26, 2011 @ 17:05
    Tom Fulton
    5

    Hi Chad,

    Try running the content through:

    umbraco.template.ParseInternalLinks(string pageContents)

    This usually gets handled by the template rendering but since you're using a base method I think you'll need to account for it yourself.

    Hope this helps,
    Tom

  • Chad Rosenthal 272 posts 474 karma points
    Apr 26, 2011 @ 17:27
    Chad Rosenthal
    0

    that worked perefectly. Thanks!

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Apr 26, 2011 @ 18:21
  • Ali Sheikh Taheri 470 posts 1648 karma points c-trib
    Dec 05, 2012 @ 17:43
    Ali Sheikh Taheri
    0

    Thanks Tom, I had the same problem.

    I had a page that generates json for specific pages. the bodyText content wasn't translating the internal links to NiceUrl. 

    I used the same method and it works great but I believe that has to be done automatically.

    Cheers

    Ali

Please Sign in or register to post replies

Write your reply to:

Draft